/**
 * jims
 */
package com.jims.master.modules.drug.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jims.master.common.persistence.DataEntity;
import com.jims.master.modules.oper.entity.PriceList;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.beans.Transient;
import java.util.Date;

/**
 * 药品价格Entity
 * @author CTQ
 * @version 2017-03-02
 */
public class DrugPrice extends DataEntity<DrugPrice> {
	
	private static final long serialVersionUID = 1L;
	private DrugInfo drugInfo;		// 药品信息ID
	private PriceList priceList;		// 价表ID
	private String stopFlag;			//价格查询标志
	private String packageSpec;		// 规格
	private String units;		// 药品单位
	private Double tradePrice;		// 市场批发价
	private Double retailPrice;		// 市场零售价
	private Date startDate;		// 起用日期
	private Date stopDate;		// 停止日期
	private String classOnRcpt;		// 费用分类
	private String classOnReckoning;		// 核算项目分类
	private String medicalInsuranceType; //医保类型
	private String subjCode;		// 会计科目
	private String classOnMr;		// 病案首页分类
	private Double priceMax;		// 最高限价
    private String supplierName;   //厂商

    @Transient
    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    @Transient
	public String getStopFlag() {
		return stopFlag;
	}
	@Transient
	public void setStopFlag(String stopFlag) {
		this.stopFlag = stopFlag;
	}

	public DrugPrice() {
		super();
	}

	public DrugPrice(String id){
		super(id);
	}

	public DrugInfo getDrugInfo() {
		return drugInfo;
	}

	public void setDrugInfo(DrugInfo drugInfo) {
		this.drugInfo = drugInfo;
	}

	public PriceList getPriceList() {
		return priceList;
	}

	public void setPriceList(PriceList priceList) {
		this.priceList = priceList;
	}

	public String getMedicalInsuranceType() {
		return medicalInsuranceType;
	}

	public void setMedicalInsuranceType(String medicalInsuranceType) {
		this.medicalInsuranceType = medicalInsuranceType;
	}

	@Length(min=1, max=20, message="规格长度必须介于 1 和 20 之间")
	public String getPackageSpec() {
		return packageSpec;
	}

	public void setPackageSpec(String packageSpec) {
		this.packageSpec = packageSpec;
	}
	
	@Length(min=1, max=2, message="药品单位长度必须介于 1 和 2 之间")
	public String getUnits() {
		return units;
	}

	public void setUnits(String units) {
		this.units = units;
	}
	

	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="起用日期不能为空")
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStopDate() {
		return stopDate;
	}

	public void setStopDate(Date stopDate) {
		this.stopDate = stopDate;
	}
	
	@Length(min=1, max=10, message="费用分类长度必须介于 1 和 10 之间")
	public String getClassOnRcpt() {
		return classOnRcpt;
	}

	public void setClassOnRcpt(String classOnRcpt) {
		this.classOnRcpt = classOnRcpt;
	}
	
	@Length(min=1, max=10, message="核算项目分类长度必须介于 1 和 10 之间")
	public String getClassOnReckoning() {
		return classOnReckoning;
	}

	public void setClassOnReckoning(String classOnReckoning) {
		this.classOnReckoning = classOnReckoning;
	}
	
	@Length(min=1, max=10, message="会计科目长度必须介于 1 和 10 之间")
	public String getSubjCode() {
		return subjCode;
	}

	public void setSubjCode(String subjCode) {
		this.subjCode = subjCode;
	}
	
	@Length(min=1, max=10, message="病案首页分类长度必须介于 1 和 10 之间")
	public String getClassOnMr() {
		return classOnMr;
	}

	public void setClassOnMr(String classOnMr) {
		this.classOnMr = classOnMr;
	}

	public Double getTradePrice() {
		return tradePrice;
	}

	public void setTradePrice(Double tradePrice) {
		this.tradePrice = tradePrice;
	}

	public Double getRetailPrice() {
		return retailPrice;
	}

	public void setRetailPrice(Double retailPrice) {
		this.retailPrice = retailPrice;
	}

	public Double getPriceMax() {
		return priceMax;
	}

	public void setPriceMax(Double priceMax) {
		this.priceMax = priceMax;
	}

	
}